/*
 * @Author: 姚沈阳 11500793+yao-shenyang@user.noreply.gitee.com
 * @Date: 2023-11-03 18:47:15
 * @LastEditors: 姚沈阳 11500793+yao-shenyang@user.noreply.gitee.com
 * @LastEditTime: 2023-11-03 20:02:16
 * @FilePath: \票务管理\app\ticketing-management\vue-project\src\modules\edittrain.ts
 * @Description: 
 * qq1908552310
 */
import { defineStore } from 'pinia'
export const useEditTrain = defineStore('editrain', {
    state: () => {
        return {
            list: JSON.parse(localStorage.getItem('editrain') as any) || []
        };
    },
    // 也可以这样定义
    // state: () => ({ count: 0 })
    actions: {
        setList(val: any) {
            window.localStorage.setItem('editrain', JSON.stringify(val))
            this.list = val
        }
    },
})